﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pacman
{
    class ListAnimation
    {
        private List<Animation> animations = new List<Animation>();

        public void Add(Animation a)
        {
            animations.Add(a);
        }

        public void Start(int direction)
        {
            animations[direction].Start();
        }

        public void Refresh(long temps,int index)
        {
            animations[index].Refresh(temps);
        }

        public void Draw(SpriteBatch spriteBatch, Vector2 position, int index)
        {
            animations[index].Draw(spriteBatch, position);
        }
    }
}
